From c2b9def4b7584e87bc7641588c4a4283c2c50bb0 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 11 Mar 2004 21:09:31 +0000 Subject: [PATCH] (ldap-search-internal): Handle file URLs with drive letters on DOS/Windows. --- lisp/net/ldap.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index d1a580f9c54..93802d5744a 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -582,6 +582,11 @@ an alist of attribute/value pairs." (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$") (setq name (match-string 1) value (match-string 3)) + ;; Need to handle file:///D:/... as generated by OpenLDAP + ;; on DOS/Windows as local files. + (if (and (memq system-type '(windows-nt ms-dos)) + (eq (string-match "/\\(.:.*\\)$" value) 0)) + (setq value (match-string 1 value))) ;; Do not try to open non-existent files (if (equal value "") (setq value " ") -- 2.30.2